Skip to content

Update history layout: total chart, grid view, show-more pagination, 10 colors#69

Merged
acrosman merged 6 commits intomainfrom
copilot/update-history-layout
Apr 16, 2026
Merged

Update history layout: total chart, grid view, show-more pagination, 10 colors#69
acrosman merged 6 commits intomainfrom
copilot/update-history-layout

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

The history panel rendered all game-day charts in a vertical stack with only 6 colors, making it unscalable for regular players with many days of data.

Changes

New: Total Play Time chart

  • Added createTotalPlayTimeChart() — an SVG line chart rendered at the top of the history panel showing aggregate daily totals across all games at a glance. Each day is plotted as a data point connected by a line, with MM-DD date labels and hover tooltips showing the exact duration.

Total Play Time line chart

Grid layout for per-game charts

  • Day groups now render in a 2-column CSS grid (.history-chart__grid) instead of a vertical stack, fitting 6 days in 3 rows.

Show-more pagination

  • createBarChart() splits summaryData into the 6 most-recent days (always visible) and older days (hidden by default). A toggle button reveals/hides the older grid and updates its own label:
// Only last INITIAL_VISIBLE_DAYS (6) are visible; older days are behind a toggle
const olderData = summaryData.slice(0, -INITIAL_VISIBLE_DAYS);
const recentData = summaryData.slice(-INITIAL_VISIBLE_DAYS);

Expanded color palette

  • Color slots expanded from 6 → 10 (--chart-color-6 through --chart-color-9): amber, teal, pink, olive. COLOR_SLOT_COUNT updated accordingly with matching CSS classes for bars and legend swatches.

Copilot AI linked an issue Apr 15, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update history layout with grid display and play time graph Update history layout: total chart, grid view, show-more pagination, 10 colors Apr 15, 2026
Copilot AI requested a review from acrosman April 15, 2026 01:26
Copy link
Copy Markdown
Owner

@acrosman acrosman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The history of total playtime at the top isn't displaying properly. There appears to be no data, and this should be a line chart not a bar chart.

Image

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 15, 2026

The history of total playtime at the top isn't displaying properly. There appears to be no data, and this should be a line chart not a bar chart.

<img width="881" height="670" alt="Image" src="https:...

Fixed in commit 374cde1. The "Total Play Time" section is now an SVG line chart — a polyline connecting daily total data points with dots and MM-DD date labels along the x-axis.

Total Play Time line chart

Copilot AI requested a review from acrosman April 15, 2026 01:45
@acrosman acrosman marked this pull request as ready for review April 16, 2026 01:36
@acrosman acrosman dismissed their stale review April 16, 2026 01:37

Issues fixed

@acrosman acrosman merged commit 60f8bef into main Apr 16, 2026
6 checks passed
@acrosman acrosman deleted the copilot/update-history-layout branch April 16, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update History Layout

2 participants